package ADTs;
import java.util.ArrayList;

import Gameplay.OnScreenObject;
import Gameplay.Player;
import Gameplay.Wave;
import Gameplay.Enemy.Enemy;
import Gameplay.Projectile.Projectile;
/**
 * This class is to store all kinds of objects (such as enemyList,
 * projectileList, player and objectList) in the current state of
 * each of the levels.
 * 
 * @author	Brian Wetherbee
 * 			Ryan McNamara
 * 			Zeng Yang
 *
 */
public class LevelStateADT {
//	/*@ public invariant wave != null;
//	  @ public invariant wave.enemyList.size() > 0; 
//	  @ public invariant UI != null;
//	  @*/
	
	//Instance variables
	private ArrayList<Enemy> enemyList;//a list of enemies
	private ArrayList<Projectile> projectileList;//a list of projectiles 
	private Player player;//a player
	private ArrayList<OnScreenObject> objectList;//a list of objects
	
	//Constructor
	public LevelStateADT(){
		player = new Player();
		enemyList = new ArrayList<Enemy>();
		projectileList = new ArrayList<Projectile>();
		objectList = new ArrayList<OnScreenObject>();

		objectList.add(player);
		//System.out.println("size of objectList is: " + objectList.size());
	}
	
	
	
	//@ \result == this.projectileList;
	public ArrayList<Projectile> getProjectileList() {
		return projectileList;
	}
	
	/*@ ensures (\forall int i; 0 <=i && i < aList.size(); 
				this.projectileList.get(i).equals(aList.get(i)));
				@*/
	public void setProjectileList(ArrayList<Projectile> aList){
		projectileList = aList;
	}
	
	//@ \result == this.enemyList;
	public ArrayList<Enemy> getEnemyList(){
		return enemyList;
	}

	//@ \result == this.player;
	public Player getPlayer(){
		return player;
	}
	//@ ensures p == this.player
	public void setPlayer(Player p){
		player = p;
	}

	//@ \result == this.objectList;
	public ArrayList<OnScreenObject> getObjectList() {
		return objectList;
	}
}
